<template>
  <div>
    <van-cell-group>
      <van-field v-model="value" placeholder="What needs to be done" @keydown.enter="add"/>
    </van-cell-group>

  </div>
</template>

<script>

  export default {
    data() {
      return {
        value:'',
        list:[]
      }
    },
    methods: {
      add(){
          this.list.unshift(
              this.value
          )
          this.$emit('addlist',this.list)
          this.value=''
      }
    }
  }
</script>

<style>

</style>